home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_1.lha / 6_1 / 6_1a1a.c next >
Text File  |  1993-08-08  |  322b  |  22 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / iterator set of functions
  6. / for class string
  7. / exercise 6.1
  8. oid iterate(int& i)
  9.  
  10.    i = 0;
  11.  
  12.  
  13. har next(int& i)
  14.  
  15.    return p->s[i++];
  16.  
  17.  
  18. nt ok(int& i)
  19.  
  20.    return p->s[i] != '\0';
  21.  
  22.